from django.test import TestCase

# Create your tests here.

#
# class Test(object):
#     def __init__(self):
#         pass
#
#     def __iter__(self):
#         print('执行iter')
#         for i in range(10):
#             yield i
#
#
# t = Test()
# for i in t:
#     print(i)
#


# def generator():
#     for i in range(10):
#         yield i
#
#
# g = generator()
# g = list(g)
# print(g)
# for i in g:
#     print(i)

lst = [1, 2, 2, 4]
lst = iter(lst)
print(next(lst))
print(next(lst))
print(next(lst))
print(next(lst))

